<template>
  <div class="rule-layout">
    <el-form :model="model" :inline="true" label-width="auto">
      <el-form-item label="工艺规程编号" prop="procedureCode">
        <el-input :value="model.procedureCode" />
      </el-form-item>
      <el-form-item label="版次" prop="versions">
        <el-input :value="model.versions" />
      </el-form-item>
      <el-form-item label="零件名称" prop="partName">
        <el-input :value="model.partName" />
      </el-form-item>
      <el-form-item label="零件图号" prop="partMap">
        <el-input :value="model.partMap" />
      </el-form-item>
      <el-form-item label="材料号牌及规范" prop="materialsNum">
        <el-input :value="model.materialsNum" />
      </el-form-item>
      <el-form-item label="毛胚尺寸及规格" prop="embryoSize">
        <el-input :value="model.embryoSize" />
      </el-form-item>
      <el-form-item label="纤维方向" prop="fibreSirection">
        <el-input :value="model.fibreSirection" />
      </el-form-item>
      <el-form-item label="套裁信息" prop="setInfo">
        <el-input :value="model.setInfo" />
      </el-form-item>
      <el-form-item label="零件重量(KG)" prop="partWeight">
        <el-input :value="model.partWeight" />
      </el-form-item>
      <el-form-item label="毛胚重量(KG)" prop="embryoWeight">
        <el-input :value="model.embryoWeight" />
      </el-form-item>
    </el-form>
    <TablePro class="table-box" :data="data" :columns="columns" :show-tools="false" :border="true" />
  </div>
</template>

<script setup lang="ts">
import TablePro from "@/components/TablePro/TablePro.vue";
import type { TableProCloumn } from "@/typings";
import { ref } from "vue";

interface Model {
  [key: string]: any;
}

type Props = {
  model: Model;
  data: any[];
};

defineProps<Props>();
const columns = ref<TableProCloumn[]>([
  {
    type: "index",
    label: "序号",
    align: "center",
    width: 80
  },
  {
    label: "工序引用文件及重要说明",
    prop: "description"
  },
  {
    label: "备注",
    prop: "remark",
    width: 300
  }
]);
</script>

<style scoped lang="scss">
.rule-layout {
  width: 100%;
  height: 100%;
  :deep(.el-form) {
    .el-form-item {
      margin-bottom: 10px;
    }
  }
  .table-box {
    height: calc(100% - 126px);
  }
}
</style>
